** Replication Code for:
** Terrorism Activates Ethnocentrism to Explain Greater Willingness to 
** Sacrifice Civil Liberties: Evidence from Germany
** Authors: Christina Novak Hansen and Peter Thisted Dinesen 
** Date: 10/02/2021

*-------------------------------------------------------------------------------

clear all
use GGSS2016_analysis.dta
svyset xs11 [pweight=wghtpew], vce(linearized)
keep if german==1 & governmentsplit!=.					

*-------------------------------------------------------------------------------
*Appendix O: Robustness check: Assessing the activation of political ideology 
*-------------------------------------------------------------------------------

								***Table O1***

tab lrID			
*Full ethnocentrism index and civil liberties with reference to terrorism
svy: regress st_terrori c.st_lrID i.sex st_age st_age2 i.proedu2 i.work2 if treatment1!=. 
outreg2 using Table_O1.xls, drop(i.sex st_age st_age2 i.proedu2 i.work2) nocons stats(coef se) dec(2) symbol(**,*) alpha(0.01,0.05) label replace 
svy: regress st_terrori c.st_lrID i.treatment1 i.sex st_age st_age2 i.proedu2 i.work2 
outreg2 using Table_O1.xls, drop(i.sex st_age st_age2 i.proedu2 i.work2) nocons stats(coef se) dec(2) symbol(**,*) alpha(0.01,0.05) label append 
svy: regress st_terrori c.st_lrID##i.treatment1 i.sex st_age st_age2 i.proedu2 i.work2 
outreg2 using Table_O1.xls, drop(i.sex st_age st_age2 i.proedu2 i.work2) nocons stats(coef se) dec(2) symbol(**,*) alpha(0.01,0.05) label append

*Interaction model including both ethnocentrism and left-right self-placement
svy: regress st_terrori c.st_ethno##i.treatment1 c.st_lrID##i.treatment1 i.sex st_age st_age2 i.proedu2 i.work2 
outreg2 using Table_O1.xls, drop(i.sex st_age st_age2 i.proedu2 i.work2) nocons stats(coef se) dec(2) symbol(**,*) alpha(0.01,0.05) label(proper) append
 
			
			
